//
//  YZYPlatformLoginManager.h
//  YZYSDK
//
//  Created by 赵隆杰 on 2024/6/7.
//

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger,PlatformResultType) {
    PlatformResultSuccess = 0,       // 平台登录成功
    PlatformResultServerError = 1,       // 服务器错误
    PlatformResultVerFailed = 2,       // 服务器校验数据返回为空校验失败
    PlatformResultJSONError = 3,       // JSON解析错误
    PlatformResultChangeAccount = 4,       // JSON解析错误
};

@class YZYLoginView;
@protocol YZYPlatformLoginDelegte <NSObject>

- (void)phoneLoginBack:(PlatformResultType)type msg:(NSString *)msg userInfo:(id)userInfo;
    
@end

@interface YZYPlatformLoginManager : NSObject

+ (instancetype)shareLoginManager;

/**
 显示登录UI
 */
- (void)showLoginViewUI;

@property (nonatomic, weak) id<YZYPlatformLoginDelegte> delegate;

/*
 根据token获取用户信息
 */
- (void)getUserByToken;

@end
 
NS_ASSUME_NONNULL_END
